package com.hyx.spring.config;

import com.hyx.spring.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @Author hyx
 * @Description 测试属性赋值
 *    @PropertySource——通过这个注解从配置文件中取值
 * @Date 2024/3/10 23:10
 * @Version 1.0
 */
@PropertySource(value = {"classpath:person.properties"})
@Configuration
public class PropertyValueConfig {

    @Bean
    public Person person(){
        return  new Person();
    }
}
